package creator;

import java.util.List;


public class ObjectInfo {
	private String name;
	private String packageName;
	private String extendsObject;
	private List<String> imports;
	private List<Property> properties;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPackageName() {
		return packageName;
	}
	public void setPackageName(String packageName) {
		this.packageName = packageName;
	}
	public String getExtendsObject() {
		return extendsObject;
	}
	public void setExtendsObject(String extendsObject) {
		this.extendsObject = extendsObject;
	}
	public List<String> getImports() {
		return imports;
	}
	public void setImports(List<String> imports) {
		this.imports = imports;
	}
	public List<Property> getProperties() {
		return properties;
	}
	public void setProperties(List<Property> properties) {
		this.properties = properties;
	}
	
	public void showObjectInfo() {
		System.out.println("Name: " + name);
		System.out.println("Package: " + packageName);
		System.out.println("Extends: " + extendsObject);
		System.out.println("import:");
		for (String i: imports) {
			System.out.println("  -" + i);
		}
		System.out.println("properties:");
		for (Property p: properties) {
			System.out.println("  -" + p);
		}
	}
	
	public String fullName() {
		return String.format("%s.%s", packageName, name);
	}
	
	public String idaoName() {
		return String.format("I%sDao", name);
	}
	
	public String idaoFullName() {
		return String.format("%s.dao.I%sDao", packageName, name);
	}
	
	public String daoName() {
		return String.format("%sDao", name);
	}
	
	public String daoFullName() {
		return String.format("%s.dao.impl.%sDao", packageName, name);
	}
	
	public String iserviceName() {
		return String.format("I%sService", name);
	}
	
	public String iserviceFullName() {
		return String.format("%s.service.I%sService", packageName, name);
	}
	
	public String serviceName() {
		return String.format("%sService", name);
	}
	
	public String serviceFullName() {
		return String.format("%s.service.impl.%sService", packageName, name);
	}
}
